package cc.owoo.godpen.analysis.json;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * 当值为布尔时，能够进行的操作
 * Created by nimensei
 * 2022-05-28 上午 01:58
 **/
public final class JsonBoolean extends Json {
    private Boolean bool;

    JsonBoolean(Boolean bool) {
        this.bool = bool;
    }

    @Override
    public Object getData() {
        return bool;
    }

    @Override
    boolean setData(Object data) {
        if (!(data instanceof Boolean bool))
            return false;
        this.bool = bool;
        return true;
    }

    @Override
    boolean setValue(String key, Object value) {
        return false;
    }

    @Override
    boolean setValue(int index, Object value) {
        return false;
    }

    @Override
    Object getValue(String key) {
        return null;
    }

    @Override
    Object getValue(int index) {
        return null;
    }

    @Override
    public Object removeValue(String key) {
        return null;
    }

    @Override
    public Object removeValue(int index) {
        return null;
    }

    @Override
    Boolean getBooleanValue() {
        return bool;
    }

    @Override
    Number getNumberValue() {
        return null;
    }

    @Override
    CharSequence getCharSequenceValue() {
        return bool.toString();
    }

    @Override
    public HashMap<String, Object> getHashMap() {
        return null;
    }

    @Override
    public ArrayList<Object> getArrayList() {
        return null;
    }
}
